<?php
spl_autoload_register(function($class) {
    $path = __DIR__ . DIRECTORY_SEPARATOR . $class . '.php';
    if (file_exists($path)) {
        require_once $path;
        return;
    }

    $path = __DIR__ . DIRECTORY_SEPARATOR . 'request' . DIRECTORY_SEPARATOR . $class . '.php';
    if (file_exists($path)) {
        require_once $path;
        return;
    }
});